﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class UserControls_ProductFrontHightLightList : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
		if (!IsPostBack)
		{
			if (Request.QueryString["CategoryID"] != null)
			{
				int categoryId = Int32.Parse(Request.QueryString["CategoryID"]);
				productFrontHightLightList.DataSource = EF_Product.GetProductByCategoryId(categoryId);
				productFrontHightLightList.DataBind();
			}
			else
			{
				productFrontHightLightList.DataSource = EF_Product.GetProductByHightLight();
				productFrontHightLightList.DataBind();
			}
		}
    }
}